<style>
  .block_price_list_swiper{
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .block_price_list_swiper .swiper-button-disabled {
    cursor: not-allowed;
  }

  .block_price_list_swiper .swiper-button-disabled svg {
    fill: #ccc;
  }
  .block_price_list .swiper-slide{
    height:auto
  }

  .block_price_list .price-item {
    border-radius: 4px;
    border: 1px solid #DDDDDD;
    cursor: pointer;
    overflow: hidden;
    height: 100%;
    width:100%;
    display: inline-flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: all .3s ease-in-out;
  }

 
  .block_price_list .price-item-header {
    background:  var(--title_bg_color,#F6F6F6);
    color: var(--title_font_color,var(--title_color));
    font-weight: bold;
    font-size: 18px;
    padding: 12px 14px;
    text-align: center;
    transition: all .3s ease-in-out;

  }

  .block_price_list .price-item-body {
    flex: 1;
    border-top: 1px solid #DDDDDD;
    padding: 0 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    word-break: break-word;
    align-items: center;
    background:  var(--content_bg_color,#fff);
    color: var(--content_font_color,var(--main_color));

  }

  .block_price_list .price-body-image {
    text-align: center;
    margin-top: 20px;
  }

  .block_price_list .price-body-image img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    vertical-align: top;
  }

  .block_price_list .price-body-des {
    font-size: 14px;
    font-weight: 300;
    margin-top: 20px;
    text-align: center;
  }

  .block_price_list .price-body-value {
    margin-top: 40px;
    text-align: center;
  }

  .block_price_list .price-body-value-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .block_price_list .price-body-original {
    font-size: 14px;
    font-weight: 300;
    line-height: 1;
    text-decoration: line-through;
    color:var(--original_price_color, var(--original_price_color)) ;
  }

  .block_price_list .price-body-sales {
    font-size: 26px;
    font-weight: bold;
    color:  var(--special_price_color, var(--buying_parice_color)) ;
    line-height: 1;
  }

  .block_price_list .price-body-unit {
    margin-top: 10px;
    font-weight: 300;
    opacity:0.5;
  }

  .block_price_list .price-body-list {
    flex: 1;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .block_price_list .price-body-list-item {
    line-height: 18px;
    display: flex;
  }
  .block_price_list .price-body-list-item svg{
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
  }
  .block_price_list .price-body-btn {
    padding: 40px 0;
    width: 100%;
  }

  .block_price_list .price-body-btn-item {
    display: block;
    font-weight: 300;
    font-size: 14px;
    padding: 12px;
    border-radius: 40px; 
    text-align: center;
    max-width: 180px;
    min-width: 80px;
    min-height: 48px;
    box-sizing: border-box;
    margin: 0 auto;
    background-color: var(--main_btn_bg_color,var(--main_button_bg));
    
    border: 1px solid var(--main_btn_bg_color,var(--main_button_bg));
    color: var(--main_btn_font_color,var(--main_button_color));
    cursor: pointer;
    transition: all 0.3s;
  }
  .block_price_list .price-body-btn-item:hover {
    opacity: 0.9;
  }

  .block_price_list  .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    overflow: hidden;
  }

  .block_price_list .pagination span {
    display: block;
    width: 10px;
    height: 10px;
    border: 2px solid #1d1f21;
    border-radius: 50%;
    background: none;
    margin: 0 3px;
    opacity: 1;
    box-sizing: border-box;
    flex-shrink: 0;
  }

  .block_price_list  .pagination span.swiper-pagination-bullet-active {
    background: #1d1f21;
  }
  .block_price_list .price-item-discount_tag{
    position: absolute;
    right: 0;
    top: -1px;
    height: 80px;
    width: 80px;
    color: #fff;
    overflow: hidden;
  }
  .block_price_list .price-item-discount_tag_name{
    position: absolute;
    top: 20px;
    left: -12px;
    right: 0;
    width: 150%;
    z-index: 9;
    line-height: 24px;
    transform: rotate(45deg);
    height: 24px;
    white-space: nowrap;
    background: var(--recommended_bg_color);
    color: var(--recommended_font_color);
    box-sizing: border-box;
    padding: 0px;
    text-align: center;
  }


  .active-price-item .price-item-header{
    background: var(--default_bg_color);
    color: var(--default_font_color);
  }
  .active-price-item .price-item-body{
    background: var(--default_body_bg_color,#fff) !important;
  }
  .hover-price-item{
    box-shadow: 0px 10px 10px 1px rgba(0, 0, 0, 0.16);
  }

  /* .block_price_list .price-item:hover {
    box-shadow: 0px 10px 20px 1px rgba(0, 0, 0, 0.16);
  }

  .block_price_list .price-item:hover .price-item-header {
    background: var(--default_bg_color);
    color: var(--default_font_color);
  }

  .block_price_list .price-item:hover  .price-body-btn-item{
    background: var(--default_bg_color);
    color: var(--default_font_color);
    border: 1px solid var(--default_bg_color);
  
  } */
  .block_price_list_swiper  .prev,
  .block_price_list_swiper  .next {
    background-color: #fff;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
  }


  @media (max-width: 768px) {
    .mobile_style-1 .swiper-wrapper{
      flex-direction: column;
      align-items: center;
      gap:20px;
    }
    .mobile_style-1 .pagination{
      display: none ;
    }
    .mobile_style-2  .swiper-wrapper {
      padding:0 !important;
      display: flex;
      flex-wrap:wrap;
    }
    .mobile_style-2  .swiper-slide{
      width:auto !important ;
      margin: 0 !important;
      flex:1;
      min-width:calc(50% - 5px)
    }
    .mobile_style-2 .swiper-wrapper{
      flex-wrap:wrap;
      gap:10px;
    }
    .mobile_style-2 .pagination{
      display: none ;
    }
    .block_price_list_swiper  .swiper-wrapper{
      padding: 0 10px;
    }
    .block_price_list_swiper  .prev,
    .block_price_list_swiper  .next {
      display: none;
    }
  }
  .block_price_list .anime-open .swiper-slide {
    opacity: 0;
  }

  .block_price_list .price-body-btn-item-second {
    margin-top: 16px;
  }
  .block_price_list .price-body-btn-item-second a {
    margin: 0 auto;
    display: block;
    text-align: center;
    font-weight: 300;
    font-size: 14px;
    padding: 12px;
    border-radius: 40px;
    background-color:  var(--secondary_btn_bg_color,var(--secondary_button_bg));
    border: 1px solid var(--secondary_btn_font_color,var(--secondary_button_color));
    color: var(--secondary_btn_font_color,var(--secondary_button_color));
    max-width: 180px;
    min-width: 80px;
    min-height: 48px;
    width: 100%;
    box-sizing: border-box;
  }
  .block_price_list .price-body-btn-item-second a:hover {
    background:  var(--main_btn_bg_color,var(--main_button_bg));
    color:  var(--main_btn_font_color,var(--main_button_color));
    transition: all 0.3s;
  }

  @keyframes fadeInUp {
      from {
          opacity: 0;
          transform: translate3d(0,40%,0)
      }

      to {
          opacity: 1;
          transform: none
      }
  }

  .fadeInUp .swiper-slide {
    animation-name: fadeInUp;
    animation-duration: 1.25s;
    animation-delay: var(--animation-delay);
    animation-fill-mode: forwards;
  }

  .block_price_list .price-body-list:empty {
    margin: 0 !important;
  }

  @media screen and (max-width: 767px) {
    .block_price_list .price-body-des {
      margin-top: calc(20px * var(--wap_title_scale));
    }
    .block_price_list .price-body-value {
      margin-top: calc(40px * var(--wap_title_scale));
    }
    .block_price_list .price-body-list {
      margin-top: calc(40px * var(--wap_title_scale));
    }
    .block_price_list .price-body-btn {
      padding: calc(40px * var(--wap_title_scale)) 0px;
    }
    .block_price_list .price-body-image {
      margin-top: calc(20px * var(--wap_title_scale));
    }

  }

</style>

{% assign blockId = block_id | default : section.block_id %}

<div class="container_wrapper block_price_list mobile_style-{{section.settings.mobile_style}}  {% if section.settings.mobile_style != '0' %}swiper-no-swiping{% endif %}" style="overflow: hidden; padding: 10px;" id="block_price_list-{{blockId}}">
  {% include 'block_title', title:section.settings.title , detail:section.settings.detail %}

  {%- if section.blocks.size -%}
  <div class="block_price_list_swiper" style="--recommended_font_color:{{section.settings.recommended_font_color}};--recommended_bg_color:{{section.settings.recommended_bg_color}};--default_font_color:{{section.settings.default_font_color}};--default_bg_color:{{section.settings.default_bg_color}};
    {%- if section.settings.title_bg_color -%}
    --title_bg_color:{{section.settings.title_bg_color}};  
    {%- endif -%}
    {%- if section.settings.title_font_color -%}
    --title_font_color:{{section.settings.title_font_color}};  
    {%- endif -%}
    {%- if section.settings.content_bg_color -%}
    --content_bg_color:{{section.settings.content_bg_color}};  
    {%- endif -%}
    {%- if section.settings.content_font_color -%}
    --content_font_color:{{section.settings.content_font_color}};  
    {%- endif -%}
    {%- if section.settings.special_price_color -%}
    --special_price_color:{{section.settings.special_price_color}};  
    {%- endif -%}
    {%- if section.settings.original_price_color -%}
    --original_price_color:{{section.settings.original_price_color}};  
    {%- endif -%}
    {%- if section.settings.main_btn_bg_color -%}
    --main_btn_bg_color:{{section.settings.main_btn_bg_color}};  
    {%- endif -%}
    {%- if section.settings.main_btn_font_color -%}
    --main_btn_font_color:{{section.settings.main_btn_font_color}};  
    {%- endif -%}
    {%- if section.settings.secondary_btn_bg_color -%}
    --secondary_btn_bg_color:{{section.settings.secondary_btn_bg_color}};  
    {%- endif -%}
    {%- if section.settings.secondary_btn_font_color -%}
    --secondary_btn_font_color:{{section.settings.secondary_btn_font_color}};  
    {%- endif -%}
    {%- if section.settings.default_body_bg_color -%}
      --default_body_bg_color:{{section.settings.default_body_bg_color}};  
      {%- endif -%}
    
    ">
    {% if section.settings.pc_number < section.blocks.size %}
    <div class="prev" id="prev_{{ blockId  }}">{% include icon_silde_left ,{width:'24',height:'24'} %}</div>
    {% endif %}

    <div id="block_price_list_swiper{{ blockId }}" style="flex:1;overflow:hidden;padding:20px;margin:-20px;">
      <div class="swiper-wrapper {% if section.settings.anime %}anime-open{% endif %}">
        {%- for block in section.blocks -%}
          <div class="swiper-slide" style="--animation-delay: {{forloop.index0 | times: 0.1}}s">
            <div class="price-item {% if forloop.index == section.settings.default_tab_number %}active-price-item{% endif %}">
              {% if block.title != '' %}
                <h3 class="price-item-header">{{block.title}}</h3>
              {% endif %}
              <div class="price-item-body">
                {% if forloop.index == section.settings.recommended_tab_number %}
                <div class="price-item-discount_tag">
                  <div class="price-item-discount_tag_name">{{section.settings.recommended_button_label}}</div>
                </div>
                {% endif %}
  
                {% if block.image.src != "" %}
                  <div class="price-body-image">
                     <img data-src="{{ block.image.src|public_front_asset_url }}"  src="{{ 'empty.png' | public_asset_abs_dir_url  }}" alt="{{ block.image.alt }}" >
                  </div>
                {% endif %}
                {% if block.subtitle != '' %}
                  <div class="price-body-des">{{block.subtitle|html_content_filter}}</div>
                {% endif %}
                <div class="price-body-value">
                  <div class="price-body-value-cell">
                    {% if block.original_price != '' %}
                    <span class="price-body-original">{{ block.original_price | money}}</span>
                    {% endif %}
                    {% if block.selling_price %}
                    <span class="price-body-sales">{{ block.selling_price | money}}</span>
                    {% endif %}
                  </div>
                  {% if block.unit != '' %}
                    <div class="price-body-unit">{{block.unit}}</div>
                  {% endif %}
                </div>
                <div class="price-body-list">
                  {% assign htmlbr = block.point_html | newline_to_br%}
                  {% assign point_html = htmlbr | split: "<br />" %}
                  {% for point in point_html %}
                  <div class="price-body-list-item">
                    {% if section.settings.icon_type == "0" %}
                      <svg t="1695783715445" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6856" width="16" height="16"><path d="M490.88 762.816a72 72 0 0 1-101.952 0L148.608 522.688a73.344 73.344 0 0 1 0-101.952 71.808 71.808 0 0 1 48.192-20.544 71.36 71.36 0 0 1 53.824 20.544l189.312 189.248 333.568-333.312a73.152 73.152 0 0 1 101.952 0 73.216 73.216 0 0 1 0 101.824z" fill="currentColor" p-id="6857"></path></svg>
                    {% endif %}
  
                    {% if section.settings.icon_type == "1" %}
                      <svg t="1695783706291" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6639" width="16" height="16"><path d="M480 544m-160 0a160 160 0 1 0 320 0 160 160 0 1 0-320 0Z" fill="currentColor" p-id="6640"></path></svg>
                    {% endif %}
  
                    {% if section.settings.icon_type == "2" %}
                      <svg t="1695783458552" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6129" width="16" height="16"><path d="M144.32 774.592c0-1.984-0.448-4.16-0.448-6.4V547.264c0-2.176 0-4.352 0.448-6.4a124.992 124.992 0 0 1 120.064-108.032h53.888l116.096-260.16a47.616 47.616 0 0 1 43.776-28.48 144.32 144.32 0 0 1 144.512 143.744v80h145.088a112.768 112.768 0 0 1 84.8 38.4 112.64 112.64 0 0 1 26.304 90.432l-44.416 288a111.04 111.04 0 0 1-110.848 94.912H264.256a121.6 121.6 0 0 1-119.936-105.088z m578.496 8.96h0.448a16.512 16.512 0 0 0 16.384-13.76l44.16-288a15.872 15.872 0 0 0-3.712-12.8 16.64 16.64 0 0 0-12.416-5.44h-193.28a48.128 48.128 0 0 1-47.936-48.128v-128a48.192 48.192 0 0 0-20.864-39.424L397.696 489.664v293.504zM240 551.232v212.864a25.152 25.152 0 0 0 24.192 19.2h37.44V528.384h-37.248a28.224 28.224 0 0 0-24.512 22.784z" fill="currentColor" p-id="6130"></path></svg>
                    {% endif %}
  
                    {% if section.settings.icon_type == "3" %}
                      <svg t="1695783694296" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6422" width="16" height="16"><path d="M384 384h320v320H384z" fill="currentColor" p-id="6423"></path></svg>
                    {% endif %}
                    <span>{{point  | html_content_filter }}</span>
                  </div>
                  {% endfor %}
  
                </div>
                <div class="price-body-btn">
                  <div class="price-body-btn-item" data-link='{{block.link | json | url_encode}}'>{{section.settings.button_label}}</div>
                  {% if block.secondary_button_label %}
                  <div class="price-body-btn-item-second">
                    <a href="{{block.secondary_btn_link | setUrlDataFrom:data_from}}">{{block.secondary_button_label}}</a>
                  </div>
                  {% endif %}
                </div>
              </div>
            </div>
          </div>
        {%- endfor -%}
      </div>
    </div>
    {% if section.settings.pc_number < section.blocks.size %}
      <div class="next" id="next_{{ blockId  }}">{% include icon_silde_right ,{width:'24',height:'24'} %}</div>
    {% endif %}
  </div>
  <div class="pagination" id="pagination_{{ blockId  }}"></div>
  {%- endif -%}

</div>


{%- if section.blocks.size -%}
<script type="text/javascript">
  (function(){
    var block_id = '{{blockId}}';
    var sildes = new Swiper('#block_price_list_swiper' + block_id, {
      slidesPerView : {{ section.settings.pc_number }},
      spaceBetween: 30,
      navigation: {
        nextEl: '#next_' + block_id,
        prevEl: '#prev_' + block_id,
      },
    
      breakpoints: {
        640: {
          {%- if section.settings.mobile_style == '2' -%}
            slidesPerView: 2,
          {%- else -%}
            slidesPerView: 1.2,
          {%- endif -%}
          spaceBetween: 20,
          {% if section.settings.mobile_style != '0' %}  noSwiping: true,{% endif %}
          pagination: {
            el: '#pagination_' + block_id,
          },
        }
      }
    })

    {% if section.settings.anime %}
    let wh = window.innerHeight
    let dom = document.querySelector('#block_price_list_swiper{{ blockId }}')
    animeFunc()
    $(window).on('scroll',function () {
      animeFunc()
    })
    {% endif %}

    function animeFunc() {
      if($('#block_price_list_swiper{{ blockId }}').hasClass('fadeInUp')) return
      const {bottom, top, height} = dom.getBoundingClientRect()
      if (bottom <= 0 || top >= wh) {
        return
      }
      $('#block_price_list_swiper{{ blockId }}').addClass('fadeInUp')
    }

    function priceBuynow(params){
      moi.ajax({
        url: "/cart/buynow",
        type: "post",
        data: JSON.stringify(params),
        success: function (ret) {
            if (!ret.code) {
              if (ret.data.checkout_url && moi) {
                   location.href = moi.setUrlParams(ret.data.checkout_url, { ref: location.href });
              }
            }else {
              return moi.alert({
                  title: ret.msg
              });
            }
        }
      });
    } 

    function getCodesFromURL(url) {
      const productCodePattern = /\/(\d+)\?/;  
      const skuCodePattern = /variant_sku_code=(\d+-\d+-\d+-\d+-\d+-\d+-\d+)/; 
  
      const productCodeMatch = url.match(productCodePattern);
      const skuCodeMatch = url.match(skuCodePattern);
  
      let productCode, skuCode;
  
      if (productCodeMatch) {
          productCode = productCodeMatch[1];
      }
  
      if (skuCodeMatch) {
          skuCode = skuCodeMatch[1];
      }
  
      return { productCode, skuCode };
    }

    $("#block_price_list_swiper{{ blockId }} .price-item").hover(function(){
      $(this).addClass("active-price-item hover-price-item")
      $(this).parent().siblings().children(".price-item").removeClass("active-price-item")
    },function(){
      var default_tab_number = '{{section.settings.default_tab_number}}';
      if(default_tab_number > 0){
        $(this).removeClass("active-price-item hover-price-item")
        $("#block_price_list_swiper{{ blockId }} .price-item").eq(default_tab_number - 1).addClass("active-price-item")
      }
    })
    
    $("#block_price_list_swiper{{ blockId }} .price-body-btn-item").click(function(){
      var link = JSON.parse(decodeURIComponent($(this).data('link')));
      if(link.url){
        if(link.type == 22){
        const { productCode, skuCode } = getCodesFromURL(link.url);
        if(productCode && skuCode){
          priceBuynow({
            product_id: Number(productCode),
            sku_code: skuCode,
            quantity: 1,
            data_from: "{{data_from}}",
            property:[]
          })
        }
        }else{
          location.href =  moi.setUrlParams(link.url, { data_from:  "{{data_from}}" })
        }
      }
    })
})()
  

</script>
{%- endif -%}



{% schema %}
{
	"tag": "",
	"class": "block_price_list",
	"is_global": false,
	"name": {
		"zh_CN": "价格对比",
		"en_US": "Price comparison"
	},
	"max_blocks": "20",
	"settings": [
		{
			"type": "card_header",
			"label": {
				"zh_CN": "设置",
				"en_US": "Settings"
			}
		},
		{
			"type": "card_input",
			"label": {
				"zh_CN": "标题",
				"en_US": "Title"
			},
			"id": "title",
			"default": "Product Subscription"
		},
		{
			"type": "card_text_editor",
			"label": {
				"zh_CN": "简短描述",
				"en_US": "Short description"
			},
			"id": "detail",
			"default": "Choose your plan and unlock a world of entertainment with our product subscription service."
		},
    {
			"type": "card_slider",
			"label": {
				"zh_CN": "PC每排数量",
				"en_US": "PC number per row"
			},
			"id": "pc_number",
			"max": "5",
			"min": "3",
			"default": "4"
		},
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "载入动画",
        "en_US": "Load animation"
      },
      "default": false,
      "id": "anime"
    },
		{
			"type": "card_select",
			"label": {
				"zh_CN": "移动端样式",
				"en_US": "Mobile styles"
			},
      "id": "mobile_style",
      "option": [
        {
          "label": {
            "zh_CN": "横向滑动",
				    "en_US": "Lateral sliding"
          },
          "value": "0"
        },
        {
          "label": {
            "zh_CN": "竖向平铺(一排一个)",
				    "en_US": "Vertical tiling (one in a row)"
          },
          "value": "1"
        },
        {
          "label": {
            "zh_CN": "竖向平铺(一排两个)",
				    "en_US": "Vertical tiling (two in a row)"
          },
          "value": "2"
        }
      ],
			"default": "0"
		},
    {
			"type": "card_select",
			"label": {
				"zh_CN": "图标",
				"en_US": "Icon"
			},
      "id": "icon_type",
      "option": [
        {
          "label": {
            "zh_CN": "打钩",
				    "en_US": "Tick"
          },
          "value": "0"
        },
        {
          "label": {
            "zh_CN": "圆点",
				    "en_US": "Round"
          },
          "value": "1"
        },
        {
          "label": {
            "zh_CN": "点赞",
				    "en_US": "Like"
          },
          "value": "2"
        },
        {
          "label": {
            "zh_CN": "方形",
				    "en_US": "Square"
          },
          "value": "3"
        }
      ],
			"default": "0"
		},
    {
			"type": "card_input",
			"label": {
				"zh_CN": "主要按钮文案",
				"en_US": "Primary button copy"
			},
			"id": "button_label",
			"default": "Order Now"
		},
    {
			"type": "card_header",
			"label": {
				"zh_CN": "颜色设置",
				"en_US": "Color Settings"
			}
		},
    
    {
      "type": "card_color",
      "id": "title_bg_color",
      "label": {
        "zh_CN": "主标题背景",
				"en_US": "Main title Background"
      },
      "default": "#F6F6F6"
    },
    {
      "type": "card_color",
      "id": "title_font_color",
      "label": {
        "zh_CN": "主标题字体",
				"en_US": "Main title font"
      },
      "default": "#1D1F21"
    },
    {
      "type": "card_color",
      "id": "content_bg_color",
      "label": {
        "zh_CN": "内容背景",
				"en_US": "Content Background"
      },
      "default": "#fff"
    },
    {
      "type": "card_color",
      "id": "content_font_color",
      "label": {
        "zh_CN": "内容字体",
				"en_US": "Content fonts"
      },
      "default": "#1D1F21"
    },
    {
      "type": "card_color",
      "id": "special_price_color",
      "label": {
        "zh_CN": "现价",
				"en_US": "Current price"
      },
      "default": "#D21936"
    },
    {
      "type": "card_color",
      "id": "original_price_color",
      "label": {
        "zh_CN": "原价",
				"en_US": "Original price"
      },
      "default": "#999"
    },
    {
      "type": "card_color",
      "id": "main_btn_bg_color",
      "label": {
        "zh_CN": "主要按钮颜背景",
				"en_US": "Main button color background"
      },
      "default": ""
    },
    {
      "type": "card_color",
      "id": "main_btn_font_color",
      "label": {
        "zh_CN": "主要按钮字体",
				"en_US": "Main button font"
      },
      "default": ""
    },
    {
      "type": "card_color",
      "id": "secondary_btn_bg_color",
      "label": {
        "zh_CN": "次要按钮背景",
				"en_US": "Secondary button background"
      },
      "default": ""
    },
    {
      "type": "card_color",
      "id": "secondary_btn_font_color",
      "label": {
        "zh_CN": "次要按钮字体&边框",
				"en_US": "Secondary button font & border"
      },
      "default": ""
    },
    {
			"type": "card_header",
			"label": {
				"zh_CN": "推荐选项卡设置",
				"en_US": "Recommended tabs"
			}
		},
    {
      "type": "card_input_number",
      "max": 30,
      "min": 0,
      "id": "recommended_tab_number",
      "label": {
        "zh_CN": "选项卡位置",
				"en_US": "TAB location"
      },
      "default": 0
    },
    {
			"type": "card_input",
			"label": {
				"zh_CN": "推荐文案",
				"en_US": "Recommended copy"
			},
			"id": "recommended_button_label",
			"default": "Popular"
		},
    {
      "type": "card_color",
      "id": "recommended_font_color",
      "label": {
        "zh_CN": "字体颜色",
				"en_US": "Font color"
      },
      "default": "#fff"
    },
    {
      "type": "card_color",
      "id": "recommended_bg_color",
      "label": {
        "zh_CN": "背景颜色",
				"en_US": "Background color"
      },
      "default": "#D42A2A"
    },
    {
			"type": "card_header",
			"label": {
				"zh_CN": "默认选中选项卡设置",
				"en_US": "The TAB is selected by default"
			}
		},
    {
      "type": "card_input_number",
      "max": 30,
      "min": 0,
      "id": "default_tab_number",
      "label": {
        "zh_CN": "选项卡位置",
				"en_US": "TAB location"
      },
      "default": 0
    },
    {
      "type": "card_color",
      "id": "default_font_color",
      "label": {
        "zh_CN": "主标题文本",
				"en_US": "Font color"
      },
      "default": "#ffffff"
    },
    {
      "type": "card_color",
      "id": "default_bg_color",
      "label": {
        "zh_CN": "主标题背景",
				"en_US": "Background color"
      },
      "default": "#1D1F21"
    },
    {
      "type": "card_color",
      "id": "default_body_bg_color",
      "label": {
        "zh_CN": "内容背景",
				"en_US": "Content Background"
      },
      "default": "#ffffff"
    }
	],
	"blocks": [
    {
			"name": {
				"zh_CN": "价格对比",
				"en_US": "Price comparison"
			},
			"type": "price-item",
			"settings": [
				{
					"type": "card_image",
					"label": {
						"zh_CN": "选择图片",
						"en_US": "Select the image"
					},
					"default": {
						"src": "",
						"alt": ""
					},
					"info": {
						"zh_CN": "尺寸建议：112px*112px",
						"en_US": "Size suggestion：112px*112px"
					},
					"id": "image"
				},
				{
					"type": "card_input",
					"label": {
						"zh_CN": "主标题",
						"en_US": "Title"
					},
					"id": "title",
					"default": "1Month"
				},
				{
					"type": "card_text_editor",
					"label": {
						"zh_CN": "副标题",
						"en_US": "Short description"
					},
					"id": "subtitle",
					"default": "1 Month Subscription"
				},
				
				{
					"type": "card_input",
					"label": {
						"zh_CN": "售价",
						"en_US": "Selling price"
					},
					"id": "selling_price",
					"default": "20"
				},
        {
					"type": "card_input",
					"label": {
						"zh_CN": "原价",
						"en_US": "Original price"
					},
					"id": "original_price",
					"default": "20"
				},
        {
					"type": "card_input",
					"label": {
						"zh_CN": "单位",
						"en_US": "unit"
					},
					"id": "unit",
					"default": "/Monthly"
				},
        {
          "type": "card_textarea",
          "id": "point_html",
          "label": {
            "zh_CN": "卖点提炼",
						"en_US": "Selling Point distillation"
          },
          "info": {
            "zh_CN": "多个卖点请换行添加",
            "en_US": "Multiple selling points please add a line break"
          },
          
          "default": "+16.00 Live Channel\n+40.000VOD\n%99.99 UpTime"
        },
        {
					"type": "card_page_link",
					"label": {
						"zh_CN": "主要按钮跳转链接",
						"en_US": "Primary button Jump links"
					},
          "info": {
            "zh_CN": "选择'商品变体'即视为立即购买，购买数量为1",
            "en_US": "Selecting 'Product Variant' is considered to be an immediate purchase, and the purchase quantity is 1"
          },
          "product_sku":true,
					"id": "link",
					"default": {
						"type": "",
						"title": "",
						"url": ""
					}
				},
        {
          "type": "card_input",
          "label": {
            "zh_CN": "次要按钮文案",
            "en_US": "Secondary button copy"
          },
          "id": "secondary_button_label",
          "default": ""
        },
        {
          "type": "card_page_link",
          "label": {
            "zh_CN": "次要按钮跳转链接",
            "en_US": "Secondary button jump links"
          },
          "default": {
            "type": "",
            "title": "",
            "url": ""
          },
          "id": "secondary_btn_link"
        }
			]
		}
  ],
	"default": {
    "settings": {
      "title": "Product Subscription",
      "detail": "Choose your plan and unlock a world of entertainment with our product subscription service.",
      "pc_number":4,
      "anime": true,
      "mobile_style": "0",
      "icon_type": "0",
      "button_label": "Order Now",
      "recommended_tab_number":3,
      "recommended_button_label":"Popular",
      "recommended_font_color":"#ffffff",
      "recommended_bg_color":"#D42A2A",
      "default_tab_number":1,
      "default_font_color":"#ffffff",
      "default_bg_color":"#1D1F21",
      "default_body_bg_color":"#ffffff",
      "title_bg_color":"#F6F6F6",
      "title_font_color":"#1D1F21",
      "content_bg_color":"#ffffff",
      "content_font_color":"#1D1F21",
      "special_price_color":"#D21936",
      "original_price_color":"#999",
      "main_btn_bg_color":"",
      "main_btn_font_color":"",
      "secondary_btn_bg_color":"",
      "secondary_btn_font_color":""
    },
    "blocks": [
      {
        "block_type": "price-item",
        "image": {
          "src": "",
          "alt": ""
        },
        "title": "1Month",
        "subtitle": "1 Month Subscription",
        "selling_price": "10",
        "original_price": "99",
        "unit": "/ Monthly",
        "point_html": "+16.00 Live Channel\n+40.000VOD\n%99.99 UpTime\n M3U,MAG,Enigma2",
        "link": {
          "type": "",
          "title": "",
          "url": ""
        },
        "secondary_button_label": "",
        "secondary_btn_link": {
          "type": "",
            "title": "",
            "url": ""
        }
      },
      {
        "block_type": "price-item",
        "image": {
          "src": "",
          "alt": ""
        },
        "title": "3 Months",
        "subtitle": "3 Months Subscription",
        "selling_price": "10",
        "original_price": "99",
        "unit": "/Monthly",
        "point_html": "+16.00 Live Channel\n+40.000VOD\n%99.99 UpTime\n24/7 Support\n M3U,MAG,Enigma2",
        "link": {
          "type": "",
          "title": "",
          "url": ""
        },
        "secondary_button_label": "",
        "secondary_btn_link": {
          "type": "",
            "title": "",
            "url": ""
        }
      },
      {
        "block_type": "price-item",
        "image": {
          "src": "",
          "alt": ""
        },
        "title": "6 Months",
        "subtitle": "6 Months Subscription",
        "selling_price": "10",
        "original_price": "99",
        "unit": "/Monthly",
        "point_html": "+16.00 Live Channel\n+40.000VOD\n%99.99 UpTime",
        "link": {
          "type": "",
          "title": "",
          "url": ""
        },
        "secondary_button_label": "",
        "secondary_btn_link": {
          "type": "",
            "title": "",
            "url": ""
        }
      },
      {
        "block_type": "price-item",
        "image": {
          "src": "",
          "alt": ""
        },
        "title": "12Month",
        "subtitle": "12 Month Subscription",
        "selling_price": "10",
        "original_price": "99",
        "unit": "/Monthly",
        "point_html": "+16.00 Live Channel\n+40.000VOD\n%99.99 UpTime",
        "link": {
          "type": "",
          "title": "",
          "url": ""
        },
        "secondary_button_label": "",
        "secondary_btn_link": {
          "type": "",
            "title": "",
            "url": ""
        }
      }
    ]
  },
	"icon": "icon-jiage"
}
{% endschema %}